import { lazy } from 'react'
import MainLayout from '../components/layout'
import { RoutesType } from '../types'

import { BarsOutlined, BankOutlined, ShareAltOutlined } from '@ant-design/icons'

const Login = lazy(() => import('../views/Login'))
const HouseResource = lazy(() => import('../views/HouseResource'))
const Live = lazy(() => import('../views/Live'))
const GroupBuy = lazy(() => import('../views/GroupBuy'))
const Order = lazy(() => import('../views/Order'))
const Audit = lazy(() => import('../views/Audit'))
const Information = lazy(() => import('../views/Information'))
const Broker = lazy(() => import('../views/Broker'))

export const constRoutes: RoutesType[] = [
  {
    path: '/login',
    element: <Login />,
    meta: {
      title: '登录',
      hidden: true,
    },
  },
  // 房源管理
  {
    path: '/',
    element: (
      <MainLayout>
        <HouseResource></HouseResource>
      </MainLayout>
    ),
    meta: {
      title: '房源管理',
      // permission: 1000,
      icon: <BankOutlined />,
    },
  },
  // 直播管理
  {
    path: '/live',
    element: (
      <MainLayout>
        <Live></Live>
      </MainLayout>
    ),
    meta: {
      title: '直播管理',
      icon: <BarsOutlined />,
    },
  },

  // 团购管理
  {
    path: '/group',
    element: (
      <MainLayout>
        <GroupBuy></GroupBuy>
      </MainLayout>
    ),
    meta: {
      title: '团购管理',
      icon: <BarsOutlined />,
    },
  },

  // 订单管理
  {
    path: '/order',
    element: (
      <MainLayout>
        <Order></Order>
      </MainLayout>
    ),
    meta: {
      title: '订单管理',
      icon: <BarsOutlined />,
    },
  },

  // 审核管理
  {
    path: '/audit',
    element: (
      <MainLayout>
        <Audit></Audit>
      </MainLayout>
    ),
    meta: {
      title: '审核管理',
      icon: <BarsOutlined />,
    },
  },

  // 资讯管理
  {
    path: '/infor',
    element: (
      <MainLayout>
        <Information></Information>
      </MainLayout>
    ),
    meta: {
      title: '资讯管理',
      icon: <BarsOutlined />,
    },
  },

  // 经纪人管理
  {
    path: '/broker',
    element: (
      <MainLayout>
        <Broker></Broker>
      </MainLayout>
    ),
    meta: {
      title: '经纪人管理',
      icon: <BarsOutlined />,
    },
  },
]
